<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // 从小到大输出
        function fn(a,b,c){
            for(var j=0;j<arguments.length;j++)
            {   
                var minn=1000000;
                for(var i=0;i<arguments.length;i++)
                {   
                    var k;//记录每一次遍历最小数的Index
                    if(arguments[i]<minn)
                    {
                        minn=arguments[i];
                        k=i;
                    }                        
                } 
                arguments[k]=1000000;
                console.log(minn+' ');
            }
           
           
        }
         fn(3,6,1); 
    </script>
</body>
</html>